package com.hxzy.shop.feign.freight;


import com.github.pagehelper.PageInfo;
import com.hxzy.shop.controller.freight.ExpressLogisticsController;
import com.hxzy.shop.dto.freight.req.*;
import com.hxzy.shop.dto.freight.resp.*;
import com.hxzy.shop.entity.LogisticsCompanyInformation;
import com.hxzy.shop.fallback.freight.FreightFallback;
import com.hxzy.shop.vo.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author ht
 * @Date 2021/7/12 11:21
 * @Version 1.0
 */
@FeignClient(value = "freight",fallback= FreightFallback.class)
public interface FreightFeign {



//    @PostMapping(value = "/freightSetUp/expressFreightList")
//    public Result<PageInfo<ExpressFreightListResp>> expressFreightList(@Validated @RequestBody ExpressFreightListReq req);
//
//
//    @PostMapping(value = "/freightSetUp/expressFreightDetails")
//    public Result<ExpressFreightDetailsResp> expressFreightDetails(@Validated @RequestBody ExpressFreightDetailsReq req);
//
//
//    @PostMapping(value = "/freightSetUp/expressFreightAdd")
//    public Result<Object> expressFreightAdd(@Validated @RequestBody ExpressFreightAddReq req);
//
//
//    @PostMapping(value = "/freightSetUp/expressFreightEdit")
//    public Result<Object> expressFreightEdit(@Validated @RequestBody ExpressFreightEditReq req);
//
//    @PostMapping(value = "/freightSetUp/delete")
//    public Result<Object> delete(@Validated @RequestBody ExpressFreightDetailsReq req);
//
//    @PostMapping(value = "/freightSetUp/freightRuleDetails")
//    public Result<FreightRule> freightRuleDetails();
//
//    @PostMapping(value = "/freightSetUp/freightRuleEdit")
//    public Result<Object> freightRuleEdit(@RequestBody FreightRuleEditReq req);
//
//    @PostMapping(value = "/freightSetUp/sameCityFreightDetails")
//    public Result<List<SameCityFreight>> sameCityFreightDetails();
//
//    @PostMapping(value = "/freightSetUp/sameCityFreightAdd")
//    public Result<Object> sameCityFreightAdd(@Validated @RequestBody SameCityFreightAddReq req);
//
//
//    @PostMapping(value = "/freightSetUp/no/select/drug")
//    public Result<PageInfo<DrugResp>> notSelectDrug(@RequestBody FreightNoSeletDrugReq freightNoSeletDrugReq);
//
//    @PostMapping(value = "/freightSetUp/expressFreightAreaList")
//    public Result<PageInfo<ExpressFreightAreaListResp>> expressFreightAreaList(@Validated @RequestBody ExpressFreightAreaListReq req);
//
//
//
//    @GetMapping(value = "/expressThreshold/getMerchant")
//    public Result<Boolean> getMerchant();
//
//    @PostMapping(value = "/expressThreshold/status")
//    public Result<Void> status(ExpressThreshold threshold);
//
//    @GetMapping("/expressThreshold/detail")
//    public Result<ExpressThreshold> detail();
//
//    @PostMapping("/expressThreshold/save")
//    public Result<Void> save(@RequestBody @Validated EditExpressThresholdReq req);


     @ApiOperation(value = "物流查询")
     @GetMapping(value = "/expressLogistics/get")
     public Result<ExpressLogisticsResp> get(@RequestParam("orderId") String orderId);

//    @ApiOperation(value = "查询物流")
//    @GetMapping(value = "/expressLogistics/get")
//    public Result<ExpressLogisticsResp> get(@RequestParam("orderId") String orderId);

    @ApiOperation(value = "查询支持的物流公司信息")
    @PostMapping(value = "/expressLogistics/getList")
    public Result<PageInfo<LogisticsCompanyInformation>> getList(@RequestBody LogisticsCompanyReq req);



//    @ApiOperation(value = "根据物流单号和物流公司编码获取物流轨迹")
//    @PostMapping(value = "/expressLogistics/getLogistics")
//    Result<ExpressLogisticsResp> getLogistics(@RequestBody LogisticsReq req);
//
//    /**
//     * 起送门槛+基础设置更新
//     * */
//    @PostMapping(value = "/freightSetUp/expressFreightRuleEdit")
//    Result<Object> expressFreightRuleEdit(@RequestBody ExpressAndFreightRuleEditReq req);
//    @PostMapping(value = "/freightSetUp/getFulfilRequirements")
//    Result<Object> getFulfilRequirements();
//    @PostMapping(value = "/freightSetUp/getExpressFreightRuleDetail")
//    Result<ExpressFreightRuleDetailResp> getExpressFreightRuleDetail();
}